﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:markup="clr-namespace:Elysium.Markup"
                    xmlns:controls="clr-namespace:Elysium.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Themes/SharedResources.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Buttons/Button.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type controls:Window}, ResourceId=DefaultCaptionButtonStyle}" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="BorderBrush" Value="{markup:ThemeResource TransparentBrush}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="32"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{markup:ThemeResource PaleBrush}"/>
                <Setter Property="BorderBrush" Value="{markup:ThemeResource PaleBrush}"/>
                <Setter Property="Foreground" Value="{markup:ThemeResource ForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{markup:ThemeResource AccentBrush}"/>
                <Setter Property="BorderBrush" Value="{markup:ThemeResource AccentBrush}"/>
                <Setter Property="Foreground" Value="{markup:ThemeResource ContrastBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type controls:Window}, ResourceId=MainWindowCaptionButtonStyle}" TargetType="{x:Type Button}" BasedOn="{StaticResource ButtonFilledStyle}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="32"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{markup:ThemeResource SemitransparentContrastBrush}"/>
                <Setter Property="BorderBrush" Value="{markup:ThemeResource SemitransparentContrastBrush}"/>
                <Setter Property="Foreground" Value="{markup:ThemeResource ContrastBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{markup:ThemeResource ContrastBrush}"/>
                <Setter Property="BorderBrush" Value="{markup:ThemeResource ContrastBrush}"/>
                <Setter Property="Foreground" Value="{markup:ThemeResource AccentBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    
</ResourceDictionary>